package com.bwie.controller;

import com.aliyun.oss.OSS;
import com.aliyun.oss.common.utils.BinaryUtil;
import com.aliyun.oss.model.MatchMode;
import com.aliyun.oss.model.PolicyConditions;
import com.bwie.common.utils.R;
import com.bwie.config.OssUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author 一凡
 * @version 1.0.0
 * @ClassName ThirdController.java
 * @Description TODO
 * @createTime 2022年04月27日 21:09:00
 */
@RestController
@RequestMapping("third")
public class ThirdController {
    @Autowired
    OssUtils ossUtils;

    @RequestMapping("/upload")
    public R upload(@RequestParam MultipartFile file){
        R r = ossUtils.uploadFile(file);
        return r;
    }
}
